package com.xt.base.util.json;


import net.sf.json.JSONObject;

public class Jsoner {
	public String toJson(){
		return toJson(this,"yyyy-MM-dd HH:mm:ss");
	}
	
	public static String toJson(Object obj,String format){
		JSONObject jsonObj = JSONObject.fromObject(obj,JsonUtil.configJson(format));
		return jsonObj.toString();
	}
	
	public static String toJson(Object obj){
		return toJson(obj,"yyyy-MM-dd HH:mm:ss");
	}
}
